<?php
/**
 * Core_Model_Mailsender
 * mail sender model
 * @author Adrian Stolarski
 */
class Core_Model_Mailsender implements Core_Model_Mainable, Core_Model_Datacheckoutable, Core_Model_Decidable {
    
    /**
     *
     * @var type $mail_sender
     * mail sender handler
     */
    public $mail_sender;
    
    public function main(array $variables = null) {
        //var_dump($variables);
        //die();
        $this->mail_sender = new Core_Data_Mailsender;
        $this->mail_sender->main($variables);
    }
    
    /**
     * data_checkout()
     * parse data initialize
     * 
     * @param array $variables
     */
    public function data_checkout(array $variables = null) {
        foreach($variables as $key => $value){
            if($variables[$key] != 'user_message'){
                $this->decision($value, null);
            }
        }
    }

    public function decision($value = null, $action = null) {
       if (eregi("(\r|\n)", $value)) {
           
       } 
    }

}
